package com.heima.day528_二维数组;

public class YuansJhuan {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};

        int start = 0;
        int end = arr.length - 1;

        for (;start<end ; start++,end--){
            int temp=arr[start];
            arr[start]=arr[end];
            arr[end]=temp;

        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }

       /* while (start<end){
            int temp=arr[start];
            arr[start]=arr[end];
            arr[end]=temp;
        }*/


    }

}
